import request from '@/utils/request'

// 获取文件详情
export function getFile(fileId) {
  return request({
    url: '/auth/file/get/' + fileId,
    method: 'get'
  })
};

// 上传文件
export function upload(data) {
  return request({
    url: '/auth/upload',
    method: 'post',
    data
  })
};

// 下载文件
export function download(fileId) {
  return request({
    url: '/auth/file/download/' + fileId,
    method: 'delete'
  })
};

// 删除文件
export function deleteFile(fileId) {
  return request({
    url: '/auth/file/delete/' + fileId,
    method: 'delete'
  })
};